/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.base.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.base.entity.StoreProduct;

/**
 * 店面产品DAO接口
 * @author liujiang
 * @version 2013-09-26
 */
public interface StoreProductDao extends StoreProductDaoCustom, CrudRepository<StoreProduct, Long> {
	@Query("from StoreProduct where STORE_ID = ?1")
	public List<StoreProduct> findListByStore(Long id);
	
	@Query("from StoreProduct where STORE_ID = ?1 AND PRODUCT_TYPE = ?2")
	public List<StoreProduct> findListByStore(Long id,int productType);
}

/**
 * DAO自定义接口
 * @author liujiang
 */
interface StoreProductDaoCustom extends BaseDao<StoreProduct> {

}

/**
 * DAO自定义接口实现
 * @author liujiang
 */
@Component
class StoreProductDaoImpl extends BaseDaoImpl<StoreProduct> implements StoreProductDaoCustom {

}
